export {}

function createNumberArray(length:number,value:number):number[]{
  const arr=Array<number>(length).fill(value);
  return arr;
}

function createStringArray(length:number,value:string):string[]{
  const arr=Array<string>(length).fill(value);
  return arr;
}

//泛型
function createArray<T>(length:number,value:T):T[]{
  const arr=Array<T>(length).fill(value);
  return arr;
}